//
//  LoveViewController.m
//  Today
//
//  Created by dllo on 15/5/27.
//  Copyright (c) 2015年 fanfan. All rights reserved.
//

#import "LoveViewController.h"

@interface LoveViewController ()

@end

@implementation LoveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    scroll.showsVerticalScrollIndicator = NO;
    scroll.showsHorizontalScrollIndicator = NO;
    scroll.bounces = NO;
    scroll.backgroundColor = [UIColor colorWithRed:0.165 green:0.173 blue:0.384 alpha:1.000];
    NSString *string = @"http://imgsresources.oss.aliyuncs.com/cmspicture/201505/large/8ae3c2a9e205f5cb4c11d1e1cb7bc1df.jpg";
    NSURL *url = [NSURL URLWithString:string];
    
    UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, scroll.frame.size.width, 250)];
    [imageview sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"双子座1.jpg"]];
    [scroll addSubview:imageview];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 250, scroll.frame.size.width, 600)];
    label.text = @"  射手座2015年真正的关键词，应该是事业与职场的起飞与征战。但这绝非说，情感在这一年的人马版图中，不重要，不吃紧。首先，土星进入你的命宫并将盘踞约三年之久，本身就给本性无忧无虑的射手座上了一道“紧箍咒”，疾风知劲草，要在人生压力增大时，射手座才会在这一年，深刻领会什么叫“患难出真情”，而如果你已经是射手的另一半，也可以在2015年，明显感受到他的成长与进步；其次，全年的三次水逆，尤其是5-6月在双子座的逆行，绝对会对射手的伴侣关系，造成累积性的影响！记得抓大放小，记得由己度人，记得放弃无谓的“对错之争”，是平稳渡过沼泽地的关键。而事实上，随着木星下半年移位进入最重要的第10宫，射手座会真正迎来人生的暖暖春日，不仅职场上得道多助齐头并进，在个人情感中也有很高频率进入到正式见家长，订婚成婚甚至与另一半携手创业的“直通快车道”哦！ ";
    label.backgroundColor = [UIColor colorWithRed:0.165 green:0.173 blue:0.384 alpha:1.000];
    label.text = self.love;
    label.font = [UIFont systemFontOfSize:20];
    CGFloat height = [FloatTool getHeightWithFont:20.0 labelWidth:375.0 string:label.text];
    scroll.contentSize = CGSizeMake(self.view.frame.size.width , height + 250 + 64);
    label.numberOfLines = 2000;
    [label sizeToFit];
    [scroll addSubview:label];
    [self.view addSubview:scroll];
    
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
